]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
PopupSliderMenuItem: intercept clicks outside the slider
authorGiovanni Campagna <gcampagna@src.gnome.org>
Thu, 21 Apr 2011 15:49:41 +0000 (17:49 +0200)
committerGiovanni Campagna <gcampagna@src.gnome.org>
Tue, 26 Apr 2011 13:40:51 +0000 (15:40 +0200)
Connect to button-press-event on the menu item actor, not on the
slider, so any part that is highlighted is also clicked. This means
that click on the left of the volume slider is a rapid way to mute.

https://bugzilla.gnome.org/show_bug.cgi?id=646660

js/ui/popupMenu.js

index b1dcf498d79f85fc2000586dee7fc697aa9595f6..4e0ffea06c2ba77af88a06e1dcdf45b718b6a542 100644 (file)
@@ -498,7 +498,7 @@ PopupSliderMenuItem.prototype = {
         this._slider = new St.DrawingArea({ style_class: 'popup-slider-menu-item', reactive: true });
         this.addActor(this._slider, { span: -1, expand: true });
         this._slider.connect('repaint', Lang.bind(this, this._sliderRepaint));
-        this._slider.connect('button-press-event', Lang.bind(this, this._startDragging));
+        this.actor.connect('button-press-event', Lang.bind(this, this._startDragging));
         this.actor.connect('scroll-event', Lang.bind(this, this._onScrollEvent));
 
         this._releaseId = this._motionId = 0;